<?php
require("../../../class/connect.php");
require("../../../class/q_functions.php");
require("../../../class/db_sql.php");
require("../../class/user.php");
require('../../class/friendfun.php');
$link=db_connect();
$Elves=new mysqlquery();
$editor=2;
eCheckCloseMods('member');//关闭模块
$user=islogin();
$melve=$_GET['melve'];
if(empty($melve))
{
	$melve="AddFriend";
}
$word="添加好友";
$fcid=(int)$_GET['fcid'];
if($fcid)
{
	$r['cid']=$fcid;
}
$fname=$_GET['fname'];
//修改
if($melve=="EditFriend")
{
	$fid=(int)$_GET['fid'];
	if(empty($fid))
	{
		printerror("ErrorUrl","",1);
	}
	$r=$Elves->fetch1("select fid,fname,cid,fsay from {$dbtbpre}melvehy where fid=$fid and userid='$user[userid]'");
	if(empty($r['fid']))
	{
		printerror("ErrorUrl","",1);
	}
	$fname=$r['fname'];
	$word="修改好友";
}
$select=ReturnFriendclass($user['userid'],$r['cid']);
//导入模板
require(elve_PATH.'core/template/member/AddFriend.php');
db_close();
$Elves=null;
?>